package com.cj.user.service.demo;

import org.junit.platform.commons.util.StringUtils;
import org.mockito.internal.util.StringUtil;

import java.text.SimpleDateFormat;
import java.util.*;

/**
 * @Author cheng jun
 * @Description:
 * @Date 2021/6/20 17:10
 */
public class Demo7 {

    public static void demo1() {
        try {
            int a = 1 / 0;
        } catch (Exception e) {
            throw e;
            //e.printStackTrace();
        } finally {
            System.out.println("异常");
        }
        System.out.println("后续");
    }


    public static void main(String[] args) {
        //Demo7.demo1();
        Map<String, Object> map = new HashMap<>();
        /*List<String> stringList = new ArrayList<>();
        stringList.add("123");
        stringList.add("234");*/
        String[] strings = new String[]{"123", "234"};
        map.put("aaa", "");
        //stringList = (List<Object>) map.get("aaa");

        if (StringUtils.isNotBlank(String.valueOf(map.get("aaa")))) {
            List<Object> stringList = new ArrayList<>();
            String[] obj = (String[]) map.get("aaa");
            for (int i = 0; i < obj.length; i++) {
                stringList.add(obj[i]);
            }
            map.put("ccc","12");
        }

        //map.put("bbb", stringList);
        //System.out.println(map.get("ccc"));

        //SimpleDateFormat simpleDateFormat = new SimpleDateFormat()
       // System.out.println(new Date());
        List<String> list = new ArrayList<>();
        list.add("1");
        list.add("2");
        List<String> list2 = list;
        list2.set(0, "3");
        System.out.println(list);
    }
}
